<?php
header("Content-Type:text/html;charset=utf-8");
$conn = mysqli_connect('localhost','root','root','massa');
$sql = "select cc from asd ";
$data = mysqli_query($conn,$sql);
$arr = mysqli_fetch_all($data);
function df($r){
    foreach ($r as $db){
        if(!is_array($db)){
            echo $db."<br>";
        }else{
            df($db);
             }
    }
}
df($arr);


